package com.qfedu.dao;

import com.qfedu.entity.Week;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface WeekDao {

    @Select("select * from t_week")
    List<Week> queryWeek();


    @Insert("insert into t_week(title,content,status,createTime,u_no) values(#{title},#{content},#{status},#{createTime},#{u_no})")
    int insertWeek(Week week);

    @Delete("delete from t_week where id = #{id}")
    int deleteById(int id);

    @Select("select * from t_week where id = #{id}")
    Week queryWeekById(int id);

    @Update("update t_week set title = #{title},content = #{content},status = #{status},createTime = #{createTime},u_no = #{u_no} where id = #{id}")
    int update(Week week);
}
